/**
  ETFAna project, Anyang Normal University && IMP-CAS
  \class ETFHistManager
  \brief a singleton manager class to manage all kinds of histograms.
  \author SUN Yazhou, asia.rabbit@163.com
  \since 2024-06-18
  \date 2024-06-18 last modified
  \attention
  changelog
  <table>
  <tr>  <th>Date         <th>Author      <th>Description                   </tr>
  <tr>  <td>2024-06-18   <td>Asia Sun    <td>file created                  </tr>
  </table>

  \copyright Copyright (c) 2021-2024 Anyang Normal U. && IMP-CAS with LGPLv3 LICENSE
*/

#ifndef ETFHistManager_h
#define ETFHistManager_h

#include <map>
#include <string>

using std::map;
using std::string;

class TH1;

class ETFHistManager{
public:
  static ETFHistManager *Instance();
  virtual ~ETFHistManager();

  TH1 *GetHist(const string &h);
  void AddHist(const string &h, TH1 *ph);

private:
  ETFHistManager();
  static ETFHistManager *kInstance;

protected:
  map<string, TH1 *> fMap;
};

#endif
